package global

import "github.com/go-redis/redis"

var RedisClient *redis.Client

func init() {
	instanceClient := redis.NewClient(&redis.Options{
		Addr:     "127.0.0.1:6379",
		//Password: "12346", // 设置密码
		DB:       1,
	})
	_, err := instanceClient.Ping().Result()
	if err != nil {
		panic(err)
	}
	RedisClient = instanceClient
}